package exception;

import java.io.FileNotFoundException;
import java.nio.file.FileAlreadyExistsException;

public class ThrowDemo {
    public static void main(String[] args)  {
        Student zs=new Student();

        try {
            zs.setAge(500);
        } catch (IllegaException e) {
            System.out.println("阿芬爱上了阿强");
        }
        System.out.println("此人年龄为"+ zs.getAge()+"岁");

    }
}
